<?php
my_component_load('testing' , false);
my_component_load('paging' , false);
my_component_load('pr_direct_calc' , false);
my_component_load('pr_master_gaji');
$task = isset($_GET['task']) ? $_GET['task'] : ""; 
$id = isset( $_GET['id'] ) ? $_GET['id']:  0;

$modulname = "Penggajian _BN_ Master Penggajian";

	if($task == "detail"){
		load_facebox_script();
		$pagename = $modulname." _BN_ Detail ";
		$content = form_detail($id);
	}elseif($task == "plaincetak"){
		@ob_end_clean(); 
		echo'<pre>';
		echo print_plain();
		exit;
	}elseif($task == "excel"){
		header("Content-Type: application/xls");
		header("Content-Disposition: attachment;filename=masterpenggajian".rand().".xls");
		echo excel_report();
		exit;	
	}elseif($task == "plaincetak_det"){
		@ob_end_clean(); 
		echo'<pre>';
		echo print_plain_det($id);
		exit;
	}elseif($task == "excel_det"){
		header("Content-Type: application/xls");
		header("Content-Disposition: attachment;filename=masterpenggajian_detail".rand().".xls");
		echo excel_report_det($id);
		exit;						
	}else{
		$pagename = $modulname;
		load_facebox_script();
		$content = report_karyawan();
	}

generate_my_web($content, $pagename  );
?>